<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    function clone(child, parent){
      child.prototype = Object.create(parent.prototype)
      child.prototype.constructor = child
    }
 
    function Parent() {
      this.name = 'aaa'
      this.age = '18'
    }
    Parent.prototype.getName = function() {
      return this.name
    }

    function Child() {
      Parent.call(this)
      this.sex = 'man'
    }
    clone(Child, Parent)

    const c1 = new Child()
    console.log(c1)
  </script>
</body>

</html>